import request from '@/utils/httpRequest'

//管理端商家档案基础信息列表
export function merchantList(data = {}) {
  return request({
    url: '/pop/merchant/back_base_list',
    method: 'get',
    params: { ...data }
  })
}
//管理端商家档案申请列表
export function merchantApplyList(data = {}) {
  return request({
    url: '/pop/merchant/back_apply_list',
    method: 'get',
    params: { ...data }
  })
}

//管理端商家档案变更申请列表
export function merchantModifyList(data = {}) {
  return request({
    url: '/pop/merchant/apply/audit_back',
    method: 'get',
    params: { ...data }
  })
}

//导出E3格式商家信息
export function exportE3FormatMerchant(data = {}) {
  return request({
    url: '/pop/merchant/export_to_e3',
    method: 'post',
    responseType: 'blob',
    data: { ...data }
  })
}

//导出E3格式商家仓库信息
export function exportE3FormatMerchantCk(data = {}) {
  return request({
    url: '/pop/merchant/export_ck_to_e3',
    method: 'post',
    responseType: 'blob',
    data: { ...data }
  })
}

export function exportBXFormatMerchant(data = {}) {
  return request({
    url: '/pop/merchant/export_to_bx',
    method: 'post',
    responseType: 'blob',
    data: { ...data }
  })
}

export function importMerchant(data = {}) {
  return request({
    url: '/pop/merchant/init',
    method: 'post',
    responseType: 'blob',
    data
  })
}

//招商人员
export function joinPerson(data = {}) {
  return request({
    url: '/pop/join_person',
    method: 'get',
    params: { ...data }
  })
}

//商家详情信息
export function accountDetailByProcessId(data = {}) {
  return request({
    url: '/pop/merchant/detail_by_processid',
    method: 'get',
    params: { ...data }
  })
}

//后台商品类目
export function backGoodsCategory(data = {}) {
  return request({
    url: '/pop/back_cate',
    method: 'get',
    params: { ...data }
  })
}

//后台编辑入驻成功的企业基本信息
export function updateMerchantInfo(data = {}) {
  return request({
    url: '/pop/merchant',
    method: 'put',
    data: { ...data }
  })
}

//商家档案变更申请详情
export function shopUpdateApplyDetail(data = {}) {
  return request({
    url: '/pop/merchant/apply/detail',
    method: 'get',
    params: { ...data }
  })
}

//中台品牌库列表
export function mdBrandList(data = {}) {
  return request({
    url: '/pop/brand/select',
    method: 'get',
    params: { ...data }
  })
}
